﻿@model Irandeb4.Models.Product

@{
    ViewBag.Title = "Create";
}

<h2>Registrar Producto</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <center><h3 style="color:Red">@ViewBag.MessageError</h3></center>
    <fieldset>
    <legend>Producto</legend>
        <table>
            <tr>
                <td class="editor-label">
                    *@Html.LabelFor(model => model.Name, "Nombre: ")
                </td>
                <td class="editor-field">
                        @Html.EditorFor(model => model.Name)
                        @Html.ValidationMessageFor(model => model.Name)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    *@Html.LabelFor(model => model.Type, "Tipo: ")
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Type)
                    @Html.ValidationMessageFor(model => model.Type)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    *@Html.LabelFor(model => model.Description,"Descripción: ")
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Description)
                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(model => model.SuppliesId, "Distribuidor: ")
                </td>
                <td class="editor-field">
                    @Html.DropDownList("Suppliers",string.Empty)
                </td>
            </tr>
        </table>

        <div align="right">
            <br />
            @Html.ActionLink("Volver", "Search");
            <input type="submit" value="Registrar" />
        </div>
    </fieldset>
}


